<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
function Father(){

}
Father.prototype.speak = function (){
    console.log("我是父类中的方法");
}

function Son(){

}
Son.prototype = new Father();
// 方法的覆写, 覆盖, 重写
Son.prototype.speak = function (){
    console.log("我是子类中的方法");
}
var s = new Son();
s.speak();
</script>
</body>
</html>